import { lazy } from "react";
const routesConfig = [
  {
    path: "/404",
    name: "404",
    component: lazy(() => import("@pages/not-found")),
  },
  {
    path: "/login",
    exact: true,
    name: "用户登录",
    component: lazy(() => import("@pages/user/user-login")),
  },
  {
    path: "/regist",
    exact: true,
    name: "用户注册",
    component: lazy(() => import("@pages/user/user-regist")),
  },
  {
    path: "/",
    component: lazy(() => import("@pages")),
    name: "首页",
    children: [
      {
        path: "/home",
        name: "主页",
        exact: true,
        component: lazy(() => import("@pages/home")),
      },
      {
        path: "/task",
        name: "任务",
        exact: true,
        component: lazy(() => import("@pages/task")),
      },
      {
        path: "/*",
        redirect:"/404"
      },
    ],
  },  
];
export default routesConfig;
